package com.winit.feature.model;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;


@Entity
@Table(name = "matrix_version_history")
@IdClass(VersionHistoryId.class)
@DynamicUpdate
@DynamicInsert
public class VersionHistory implements Serializable{
    @Id
    @Column(name = "relation_id")
    private String relationId;  //关联对象id
    @Column(name = "relation_name")
    private String relationName;  //关联对象名称
    @Id
    @Column(name = "version")
    private String version;  //功能点版本，V开头，类似 V1.1 V1.2
    @Column(name = "attr_config_id")
    private String attrConfigId;  //对应的config表记录id
    @Id
    @Column(name = "req_id")
    private String reqId;  //需求id
    @Column(name = "req_name")
    private String reqName;  //需求名称
    @Column(name = "create_time")
    private Date createTime;  //
    @Column(name = "type")
    private String type;  //关联对象类型 ,以后还会有其他的  FLOW/FEATURE

    public String getRelationId() {
        return relationId;
    }

    public void setRelationId(String relationId) {
        this.relationId = relationId;
    }

    public String getRelationName() {
        return relationName;
    }

    public void setRelationName(String relationName) {
        this.relationName = relationName;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getAttrConfigId() {
        return attrConfigId;
    }

    public void setAttrConfigId(String attrConfigId) {
        this.attrConfigId = attrConfigId;
    }

    public String getReqId() {
        return reqId;
    }

    public void setReqId(String reqId) {
        this.reqId = reqId;
    }

    public String getReqName() {
        return reqName;
    }

    public void setReqName(String reqName) {
        this.reqName = reqName;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
